From 6ea4bf8a9d60ab22e2ddf84243b629791ef59c4d Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Sat, 22 Feb 2014 19:10:59 +0100 Subject: [PATCH] wayland: Fix gdk_window_wayland_resize_cairo_surface() Like in other backends (except X) we can't resize cairo image surfaces so let's sync the code here with what the other backends do. This prevents the painting machinery above us to paint on the wrong buffer. https://bugzilla.gnome.org/show_bug.cgi?id=724968 --- gdk/wayland/gdkwindow-wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index b0772b51ea..d980bf8699 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1487,7 +1487,10 @@ gdk_window_wayland_resize_cairo_surface (GdkWindow *window, gint width, gint height) { - return surface; + /* cairo image surfaces cannot be resized */ + cairo_surface_destroy (surface); + + return NULL; } static cairo_region_t * -- 2.30.2